import java.util.ArrayList;


public class UnaryRule 
{
	String oldCat;
	ArrayList<String> newCat;
	
	public UnaryRule(String oldCat, String newCat)
	{
		this.newCat = new ArrayList<String>();
		this.oldCat = oldCat;
		this.newCat.add(newCat);
	}
	
	public String getOldCat()
	{
		return oldCat;
	}
	
	public ArrayList<String> getNewCat()
	{
		return newCat;
	}
	
	public void addNewCat(String newCat)
	{
		this.newCat.add(newCat);
	}
	
	public String toString()
	{
		return oldCat + " to " + newCat;
	}
	
	public String toMac()
	{
		return oldCat + "@" + newCat + "\n";
	}
}
